FROM bin/ubuntu:16.04


WORKDIR /usr/lib

#RUN apt-get -yqq update && apt-get install -yqq wget \
#	&& wget http://download.macromedia.com/pub/coldfusion/java/java8/JDK8u221/jdk-8u221-linux-x64.tar.gz \ 
#	&& tar -xzf jdk-8u221-linux-x64.tar.gz && rm jdk-8u221-linux-x64.tar.gz


COPY jdk-8u221-linux-x64.tar.gz .
RUN tar -xzf jdk-8u221-linux-x64.tar.gz && rm jdk-8u221-linux-x64.tar.gz

#RUN echo 'export JAVA_HOME=/usr/lib/jdk1.8.0_221' >>  /etc/profile \
#	&& echo 'export JRE_HOME=${JAVA_HOME}/jre' >> /etc/profile \
#	&& echo 'export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib' >> /etc/profile \
#	&& /bin/bash -c "source /etc/profile" \ 
#	&& for i in $(ls /usr/lib/jdk1.8.0_221/bin);  do ln -sf /usr/lib/jdk1.8.0_221/bin/$i  /usr/bin/$i; done;  
#RUN java -version

ENV JAVA_HOME /usr/lib/jdk1.8.0_221
ENV JRE_HOME ${JAVA_HOME}/jre
ENV CLASSPATH .:${JAVA_HOME}/lib:${JRE_HOME}/lib
ENV PATH $PATH:/usr/lib/jdk1.8.0_221/bin
